package edu.byu.isys413.mystuff.sales;;


/**
 * 
 * @author Gabe
 */
public class StoreBO {
    
    private String storeID;
    private String address;
    private String managerID;
    private String phone;
    boolean alreadyInDB;
    boolean isDirty;
    
    /** Creates a new instance of StoreBO */
    public StoreBO() {
    }
    
    /**
     * Creates a new instance of StoreBO
     * @param id contains the already existing id for the store object to be created
     */
    public StoreBO(String id) {
        this.storeID = id;
        this.setIsDirty(true);
    }
    
    /** Retrieves the store ID from the object
     *
     * @return storeID
     */
    public String getStoreID() {
        return storeID;
    }

    /** sets the storeID
     * 
     * @param storeID contains a GUID string
     */
    public void setStoreID(String storeID) {
        setIsDirty(true);
        this.storeID = storeID;
    }

    /**
     * Retrieves the store address
     * @return address
     */
    public String getAddress() {
        return address;
    }

    /** Sets the store address
     * 
     * @param address contains the address for the Store.
     */
    public void setAddress(String address) {
        setIsDirty(true);
        this.address = address;
    }

    /** Returns the store phone number
     * 
     * @return phone
     */
    public String getPhone() {
        return phone;
    }

    /** Sets the store phone number
     * 
     * @param phone contains the phone number for the store
     */
    public void setPhone(String phone) {
        setIsDirty(true);
        this.phone = phone;
    }
    
    /** Sets the alreadyInDB variable to indicate that 
     * the information contained in this object has been stored in the database
     * 
     * @param is indicates whether the object exists in the DB or not
     */
    public void setAlreadyInDB(boolean is){
        setIsDirty(true);
        this.alreadyInDB = is;
    }

    /** Returns if the information contained in this object has already been stored in the database
     * 
     * @return returns alreadyInDB
     */
    public boolean isAlreadyInDB() {
        return alreadyInDB;
    }

    /** Returns if information has been changed within this object
     * 
     * @return isDirty
     */
    public boolean isIsDirty() {
        return isDirty;
    }

    /** Sets the variable isDirty to indicate that some information has been modified or changed
     *in this object
     * 
     * @param isDirty indicating if the DB needs to be updated with new info
     */
    public void setIsDirty(boolean isDirty) {
        this.isDirty = isDirty;
    }    

    public String getManagerID() {
        return managerID;
    }

    public void setManagerID(String managerID) {
        this.managerID = managerID;
    }
    
}

